#include<stdio.h>
void Bubble_sort(int a[], int sz)
{
	int i = 0;
	for (i = 0; i < sz - 1; i++)
	{
		int j = 0;
		int flag = 1;
		for (j = 0; j < sz - 1 - i; j++)
		{
			if (a[j] > a[j + 1])
			{
				int tmp = a[j];
				a[j] = a[j + 1];
				a[j + 1] = tmp;
				flag = 0;
			}
		}
		if (flag == 1)
			break;
	}
}	
int main()
{
	int a[] = { 2,3,6,7,0,9,1,4,5,8 };
	int i = 0;
	int sz = sizeof(a) / sizeof(a[0]);
	Bubble_sort(a, sz);
	for (i = 0; i < sz ; i++)
	{
		printf("%d ", a[i]);
	}
	return 0;
}